import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';

import 'package:get/get.dart';
import 'package:getwidget/components/accordion/gf_accordion.dart';

import '../controllers/gfaccordion_controller.dart';

class GfaccordionView extends GetView<GfaccordionController> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('手风琴'),
        centerTitle: true,
      ),
      body: Container(
        margin: EdgeInsets.all(10),
        child: ListView(
          children: [
            GFAccordion(
              title: 'GF Accordion',
              content: 'GetFlutter is an open source library that comes with pre-build 1000+ UI components.'
            ),
            GFAccordion(
              title: 'GF Accordion',
              content: 'GetFlutter is an open source library that comes with pre-build 1000+ UI components.',
              collapsedIcon: Icon(Icons.add, color: Colors.blue,),
              expandedIcon: Icon(Icons.remove, color: Colors.green,),
              showAccordion: true,
            ),

            // GFAccordion(
            //   title: 'GF Accordion',
            //   content: 'GetFlutter is an open source library that comes with pre-build 1000+ UI components.',
            //   collapsedIcon: Icon(Icons.add, color: Colors.blue,),
            //   expandedIcon: Icon(Icons.remove, color: Colors.green,),
            //   showAccordion: true,
            //   titleBorder: Border(
            //     top: BorderSide(
            //       color: Color(0xFFD8B8B8),
            //       width: 1,
            //       style: BorderStyle.solid
            //     ),
            //     bottom: BorderSide.none
            //   ),
            // ),

            GFAccordion(
              title: 'GF Accordion',
              content: 'GetFlutter is an open source library that comes with pre-build 1000+ UI components.',
              collapsedIcon: Text('Show'),
              expandedIcon: Text('Hide'),
              showAccordion: true,
              collapsedTitleBackgroundColor: Colors.grey,
              expandedTitleBackgroundColor: Colors.lightGreen,
            ),
          ],
        ),
      ),
    );
  }
}
